package com.example.demo.Mapper;

import com.example.demo.Model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageMapper {
    @Select("select * from message_info")
    List<MessageInfo> getList();

    @Insert("INSERT INTO message_info (`from`,`to`,message) VALUES (#{from},#{to},#{message})")
    void insertInfo(MessageInfo m);
}
